package com.behelpful.common.core.jackson;

import com.behelpful.common.core.enums.IEnum;
import com.fasterxml.jackson.core.json.PackageVersion;
import com.fasterxml.jackson.databind.module.SimpleModule;

/**
 * 枚举类自定义系列化规则
 *
 * @author Alay
 * @date 2021-08-17 09:47
 * @project be-helpful
 */
public class IEnumModule extends SimpleModule {

    public IEnumModule() {
        super(PackageVersion.VERSION);

        // 自定义通用枚举类反系列化处理
        this.addDeserializer(IEnum.class, new IEnumDeserializer());
    }
}
